$(document).ready(function(){
 /* The following code is executed once the DOM is loaded */
 
 // Calling the jQuery plugin and splitting the
 // #holder UL into pages of 3 LIs each:
 
 $('#holder').sweetPages({perPage:3});
 
 // The default behaviour of the plugin is to insert the
 // page links in the ul, but we need them in the main container:
 
 var controls = $('.swControls').detach();
 controls.appendTo('#main');
 
});